'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH CRYPT_SHA256 7 "May 8, 2008"
.SH NAME
crypt_sha256 \- password hashing module using SHA-256 message hash algorithm
.SH SYNOPSIS
.LP
.nf
\fB/usr/lib/security/$ISA/crypt_sha256.so\fR
.fi

.SH DESCRIPTION
.sp
.LP
The \fBcrypt_sha256\fR module is a one-way password hashing module for use with
\fBcrypt\fR(3C) that uses the SHA-256 message hash algorithm. The algorithm
identifier for \fBcrypt.conf\fR(5) and \fBpolicy.conf\fR(5) is \fB5\fR.
.sp
.LP
This module is designed to make it difficult to crack passwords that use brute
force attacks based on high speed SHA-256 implementations that use code
inlining, unrolled loops, and table lookup.
.sp
.LP
The maximum password length for \fBcrypt_sha256\fR is 255 characters.
.sp
.LP
The following options can be passed to the module by means of
\fBcrypt.conf\fR(5):
.sp
.ne 2
.na
\fB\fBrounds=\fR\fI<positive_number>\fR\fR
.ad
.sp .6
.RS 4n
Specifies the number of rounds of SHA-256 to use in generation of the salt; the
default number of rounds is 5000. Negative values have no effect and are
ignored. The minimum number of rounds cannot be below 1000.
.sp
The number of additional rounds is stored in the salt string returned by
\fBcrypt_gensalt\fR(3C). For example:
.sp
.in +2
.nf
$5,rounds=6000$nlxmTTpz$
.fi
.in -2

When \fBcrypt_gensalt\fR(3C) is being used to generate a new salt, if the
number of additional rounds configured in \fBcrypt.conf\fR(5) is greater than
that in the old salt, the value from \fBcrypt.conf\fR(5) is used instead. This
allows for migration to stronger (but more time-consuming) salts on password
change.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR passwd (1),
.BR crypt (3C),
.BR crypt_genhash_impl (3C),
.BR crypt_gensalt (3C),
.BR crypt_gensalt_impl (3C),
.BR getpassphrase (3C),
.BR crypt.conf (5),
.BR passwd (5),
.BR policy.conf (5),
.BR attributes (7)
